<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>State Lattice Planner: include/trajectory_generator/motion_model_diff_drive.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">State Lattice Planner
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('motion__model__diff__drive_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">motion_model_diff_drive.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="motion__model__diff__drive_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#ifndef __MOTION_MODEL_DIFF_DRIVE_H</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#define __MOTION_MODEL_DIFF_DRIVE_H</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160; </div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;chrono&gt;</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160; </div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;Eigen/Dense&gt;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160; </div>
<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="class_motion_model_diff_drive.html">   17</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_motion_model_diff_drive.html">MotionModelDiffDrive</a></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;{</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    <a class="code" href="class_motion_model_diff_drive.html#aeebe85b89f207ba2c760feba0206e8f0">MotionModelDiffDrive</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; </div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="class_motion_model_diff_drive_1_1_state.html">   28</a></span>&#160;    <span class="keyword">class </span><a class="code" href="class_motion_model_diff_drive_1_1_state.html">State</a></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    {</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        <a class="code" href="class_motion_model_diff_drive_1_1_state.html#a777545e21bc8787a253f27b9b1630ac6">State</a>(<span class="keywordtype">double</span>, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>);</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160; </div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        <span class="keywordtype">double</span> x;<span class="comment">// robot position x</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;        <span class="keywordtype">double</span> y;<span class="comment">// robot posiiton y</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <span class="keywordtype">double</span> yaw;<span class="comment">// robot orientation yaw</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        <span class="keywordtype">double</span> v;<span class="comment">// robot linear velocity</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        <span class="keywordtype">double</span> omega;<span class="comment">// robot angular velocity</span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="keyword">private</span>:</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    };</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160; </div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="class_motion_model_diff_drive_1_1_velocity_params.html">   52</a></span>&#160;    <span class="keyword">class </span><a class="code" href="class_motion_model_diff_drive_1_1_velocity_params.html">VelocityParams</a></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    {</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <a class="code" href="class_motion_model_diff_drive_1_1_velocity_params.html#a286b64a668b457a92215763d166881ba">VelocityParams</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        <a class="code" href="class_motion_model_diff_drive_1_1_velocity_params.html#a286b64a668b457a92215763d166881ba">VelocityParams</a>(<span class="keywordtype">double</span>, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>);<span class="comment">// v0, a0, vt, vf, af</span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160; </div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <span class="keywordtype">double</span> v0;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        <span class="keywordtype">double</span> a0;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        <span class="keywordtype">double</span> vt;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        <span class="keywordtype">double</span> vf;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        <span class="keywordtype">double</span> af;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        <span class="keywordtype">double</span> time;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    <span class="keyword">private</span>:</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    };</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="class_motion_model_diff_drive_1_1_angular_velocity_params.html">   81</a></span>&#160;    <span class="keyword">class </span><a class="code" href="class_motion_model_diff_drive_1_1_angular_velocity_params.html">AngularVelocityParams</a></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    {</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        <a class="code" href="class_motion_model_diff_drive_1_1_angular_velocity_params.html#a56110c7499e6b0015431b62a6dbf65ad">AngularVelocityParams</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        <a class="code" href="class_motion_model_diff_drive_1_1_angular_velocity_params.html#a56110c7499e6b0015431b62a6dbf65ad">AngularVelocityParams</a>(<span class="keywordtype">double</span>, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>, <span class="keywordtype">double</span>);</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160; </div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_motion_model_diff_drive_1_1_angular_velocity_params.html#a67712320a21e08bd3d731fb6422cdd66">calculate_spline</a>(<span class="keywordtype">double</span> ratio=0.5);</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160; </div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        <span class="keywordtype">double</span> k0;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        <span class="keywordtype">double</span> km;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        <span class="keywordtype">double</span> kf;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        <span class="keywordtype">double</span> sf;</div>
<div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="class_motion_model_diff_drive_1_1_angular_velocity_params.html#adf86344ae0d85f694d668441562a2fe2">  110</a></span>&#160;        std::vector&lt;Eigen::Vector4d&gt; <a class="code" href="class_motion_model_diff_drive_1_1_angular_velocity_params.html#adf86344ae0d85f694d668441562a2fe2">coefficients</a>;</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    <span class="keyword">private</span>:</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    };</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160; </div>
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="class_motion_model_diff_drive_1_1_control_params.html">  117</a></span>&#160;    <span class="keyword">class </span><a class="code" href="class_motion_model_diff_drive_1_1_control_params.html">ControlParams</a></div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    {</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        <a class="code" href="class_motion_model_diff_drive_1_1_control_params.html#aa1c7107918f6dcecc0c603a588dfed2b">ControlParams</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        <a class="code" href="class_motion_model_diff_drive_1_1_control_params.html#aa1c7107918f6dcecc0c603a588dfed2b">ControlParams</a>(<span class="keyword">const</span> <a class="code" href="class_motion_model_diff_drive_1_1_velocity_params.html">VelocityParams</a>&amp;, <span class="keyword">const</span> <a class="code" href="class_motion_model_diff_drive_1_1_angular_velocity_params.html">AngularVelocityParams</a>&amp;);</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160; </div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        <a class="code" href="class_motion_model_diff_drive_1_1_velocity_params.html">VelocityParams</a> vel;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        <a class="code" href="class_motion_model_diff_drive_1_1_angular_velocity_params.html">AngularVelocityParams</a> omega;</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="keyword">private</span>:</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    };</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160; </div>
<div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="class_motion_model_diff_drive_1_1_trajectory.html">  139</a></span>&#160;    <span class="keyword">class </span><a class="code" href="class_motion_model_diff_drive_1_1_trajectory.html">Trajectory</a></div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    {</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;        <a class="code" href="class_motion_model_diff_drive_1_1_trajectory.html#ae6b306b37c006ada95b5e7d4d280ff95">Trajectory</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160; </div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        <span class="comment">// these vectors must be same size</span></div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;        std::vector&lt;Eigen::Vector3d&gt; trajectory;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;        std::vector&lt;double&gt; velocities;</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        std::vector&lt;double&gt; angular_velocities;</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        <span class="keywordtype">double</span> cost;</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <span class="keyword">private</span>:</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    };</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160; </div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_motion_model_diff_drive.html#a47385c578af93379674f2cbd83a55bef">set_param</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>, <span class="keyword">const</span> <span class="keywordtype">double</span>, <span class="keyword">const</span> <span class="keywordtype">double</span>, <span class="keyword">const</span> <span class="keywordtype">double</span>, <span class="keyword">const</span> <span class="keywordtype">double</span>, <span class="keyword">const</span> <span class="keywordtype">double</span>);</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_motion_model_diff_drive.html#a1d38228bcabfd331bffdebdd14bdb388">generate_trajectory</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>, <span class="keyword">const</span> <a class="code" href="class_motion_model_diff_drive_1_1_control_params.html">ControlParams</a>&amp;, <a class="code" href="class_motion_model_diff_drive_1_1_trajectory.html">Trajectory</a>&amp;);</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_motion_model_diff_drive.html#a3721fec9820df49b1d9c1599f7cae377">generate_last_state</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>, <span class="keyword">const</span> <span class="keywordtype">double</span>, <span class="keyword">const</span> <a class="code" href="class_motion_model_diff_drive_1_1_velocity_params.html">VelocityParams</a>&amp;, <span class="keyword">const</span> <span class="keywordtype">double</span>, <span class="keyword">const</span> <span class="keywordtype">double</span>, <span class="keyword">const</span> <span class="keywordtype">double</span>, Eigen::Vector3d&amp;);</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_motion_model_diff_drive.html#a9c5284e9c215500a65adc3622349d6b4">make_velocity_profile</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>, <span class="keyword">const</span> <a class="code" href="class_motion_model_diff_drive_1_1_velocity_params.html">VelocityParams</a>&amp;);</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    <span class="keywordtype">double</span> <a class="code" href="class_motion_model_diff_drive.html#a0d5c5c4f44a426cafc38a3dd320be7a8">estimate_driving_time</a>(<span class="keyword">const</span> <a class="code" href="class_motion_model_diff_drive_1_1_control_params.html">ControlParams</a>&amp;);</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_motion_model_diff_drive.html#a45fc33f86f5ae06596749fdda60065ac">update</a>(<span class="keyword">const</span> <a class="code" href="class_motion_model_diff_drive_1_1_state.html">State</a>&amp;, <span class="keyword">const</span> <span class="keywordtype">double</span>, <span class="keyword">const</span> <span class="keywordtype">double</span>, <span class="keyword">const</span> <span class="keywordtype">double</span>, <a class="code" href="class_motion_model_diff_drive_1_1_state.html">State</a>&amp;);</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    <span class="keywordtype">double</span> <a class="code" href="class_motion_model_diff_drive.html#ab0bbacfda45c549888492ff6b998ffab">calculate_quadratic_function</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>, <span class="keyword">const</span> Eigen::Vector3d&amp;);</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    <span class="keywordtype">double</span> <a class="code" href="class_motion_model_diff_drive.html#ac79658bdde639a21a5b2c56b6727f540">calculate_cubic_function</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>, <span class="keyword">const</span> Eigen::Vector4d&amp;);</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_motion_model_diff_drive.html#acc59cfed44ebc303aec321654a30c751">response_to_control_inputs</a>(<span class="keyword">const</span> <a class="code" href="class_motion_model_diff_drive_1_1_state.html">State</a>&amp;, <span class="keyword">const</span> <span class="keywordtype">double</span>, <a class="code" href="class_motion_model_diff_drive_1_1_state.html">State</a>&amp;);</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_motion_model_diff_drive.html#aa8b738c94b8a01acc068dd45e79b3cd9">control_speed</a>(<span class="keyword">const</span> <a class="code" href="class_motion_model_diff_drive_1_1_state.html">State</a>&amp; state, <a class="code" href="class_motion_model_diff_drive_1_1_state.html">State</a>&amp; _state);</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160; </div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;    <span class="keywordtype">double</span> MAX_YAWRATE;</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    <span class="keywordtype">double</span> MAX_D_YAWRATE;</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    <span class="keywordtype">double</span> MAX_ACCELERATION;</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;    <span class="keywordtype">double</span> MAX_WHEEL_ANGULAR_VELOCITY;</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    <span class="keywordtype">double</span> WHEEL_RADIUS;</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    <span class="keywordtype">double</span> TREAD;</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160; </div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    std::vector&lt;double&gt; v_profile;</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    std::vector&lt;double&gt; s_profile;</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160; </div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    <span class="keywordtype">double</span> ratio;</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;};</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160; </div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;<span class="preprocessor">#endif //__MOTION_MODEL_DIFF_DRIVE_H</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclass_motion_model_diff_drive_html_a1d38228bcabfd331bffdebdd14bdb388"><div class="ttname"><a href="class_motion_model_diff_drive.html#a1d38228bcabfd331bffdebdd14bdb388">MotionModelDiffDrive::generate_trajectory</a></div><div class="ttdeci">void generate_trajectory(const double, const ControlParams &amp;, Trajectory &amp;)</div><div class="ttdoc">Generate a trajectory from given control parameters.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.cpp:153</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_1_1_angular_velocity_params_html_a56110c7499e6b0015431b62a6dbf65ad"><div class="ttname"><a href="class_motion_model_diff_drive_1_1_angular_velocity_params.html#a56110c7499e6b0015431b62a6dbf65ad">MotionModelDiffDrive::AngularVelocityParams::AngularVelocityParams</a></div><div class="ttdeci">AngularVelocityParams(void)</div><div class="ttdoc">Constructor.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.cpp:44</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_html_aeebe85b89f207ba2c760feba0206e8f0"><div class="ttname"><a href="class_motion_model_diff_drive.html#aeebe85b89f207ba2c760feba0206e8f0">MotionModelDiffDrive::MotionModelDiffDrive</a></div><div class="ttdeci">MotionModelDiffDrive(void)</div><div class="ttdoc">Constructor.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.cpp:3</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_1_1_velocity_params_html"><div class="ttname"><a href="class_motion_model_diff_drive_1_1_velocity_params.html">MotionModelDiffDrive::VelocityParams</a></div><div class="ttdoc">Class representing velocity profile for trajectories.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.h:52</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_1_1_state_html_a777545e21bc8787a253f27b9b1630ac6"><div class="ttname"><a href="class_motion_model_diff_drive_1_1_state.html#a777545e21bc8787a253f27b9b1630ac6">MotionModelDiffDrive::State::State</a></div><div class="ttdeci">State(double, double, double, double, double)</div><div class="ttdoc">Constructor.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.cpp:16</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_1_1_trajectory_html_ae6b306b37c006ada95b5e7d4d280ff95"><div class="ttname"><a href="class_motion_model_diff_drive_1_1_trajectory.html#ae6b306b37c006ada95b5e7d4d280ff95">MotionModelDiffDrive::Trajectory::Trajectory</a></div><div class="ttdeci">Trajectory(void)</div><div class="ttdoc">Constructor.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.cpp:75</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_html_a47385c578af93379674f2cbd83a55bef"><div class="ttname"><a href="class_motion_model_diff_drive.html#a47385c578af93379674f2cbd83a55bef">MotionModelDiffDrive::set_param</a></div><div class="ttdeci">void set_param(const double, const double, const double, const double, const double, const double)</div><div class="ttdoc">Set motion parameters.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.cpp:80</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_1_1_state_html"><div class="ttname"><a href="class_motion_model_diff_drive_1_1_state.html">MotionModelDiffDrive::State</a></div><div class="ttdoc">Class representing robot state.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.h:28</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_1_1_angular_velocity_params_html_a67712320a21e08bd3d731fb6422cdd66"><div class="ttname"><a href="class_motion_model_diff_drive_1_1_angular_velocity_params.html#a67712320a21e08bd3d731fb6422cdd66">MotionModelDiffDrive::AngularVelocityParams::calculate_spline</a></div><div class="ttdeci">void calculate_spline(double ratio=0.5)</div><div class="ttdoc">Calculate 3D spline parameters from k0, km, kf, sf. coefficients will be to the parameters.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.cpp:242</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_1_1_velocity_params_html_a286b64a668b457a92215763d166881ba"><div class="ttname"><a href="class_motion_model_diff_drive_1_1_velocity_params.html#a286b64a668b457a92215763d166881ba">MotionModelDiffDrive::VelocityParams::VelocityParams</a></div><div class="ttdeci">VelocityParams(void)</div><div class="ttdoc">Constructor.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.cpp:25</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_1_1_trajectory_html"><div class="ttname"><a href="class_motion_model_diff_drive_1_1_trajectory.html">MotionModelDiffDrive::Trajectory</a></div><div class="ttdoc">Class representing a trajectory.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.h:139</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_html_a0d5c5c4f44a426cafc38a3dd320be7a8"><div class="ttname"><a href="class_motion_model_diff_drive.html#a0d5c5c4f44a426cafc38a3dd320be7a8">MotionModelDiffDrive::estimate_driving_time</a></div><div class="ttdeci">double estimate_driving_time(const ControlParams &amp;)</div><div class="ttdoc">Estimate driveing time from given control parameter.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.cpp:322</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_1_1_angular_velocity_params_html"><div class="ttname"><a href="class_motion_model_diff_drive_1_1_angular_velocity_params.html">MotionModelDiffDrive::AngularVelocityParams</a></div><div class="ttdoc">Class representing yawrate profile for trajectories.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.h:81</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_1_1_control_params_html_aa1c7107918f6dcecc0c603a588dfed2b"><div class="ttname"><a href="class_motion_model_diff_drive_1_1_control_params.html#aa1c7107918f6dcecc0c603a588dfed2b">MotionModelDiffDrive::ControlParams::ControlParams</a></div><div class="ttdeci">ControlParams(void)</div><div class="ttdoc">Constructor.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.cpp:64</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_html_a45fc33f86f5ae06596749fdda60065ac"><div class="ttname"><a href="class_motion_model_diff_drive.html#a45fc33f86f5ae06596749fdda60065ac">MotionModelDiffDrive::update</a></div><div class="ttdeci">void update(const State &amp;, const double, const double, const double, State &amp;)</div><div class="ttdoc">Update state.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.cpp:90</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_html_a3721fec9820df49b1d9c1599f7cae377"><div class="ttname"><a href="class_motion_model_diff_drive.html#a3721fec9820df49b1d9c1599f7cae377">MotionModelDiffDrive::generate_last_state</a></div><div class="ttdeci">void generate_last_state(const double, const double, const VelocityParams &amp;, const double, const double, const double, Eigen::Vector3d &amp;)</div><div class="ttdoc">Generate a state at the end of a trajectory from given control parameters.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.cpp:213</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_html"><div class="ttname"><a href="class_motion_model_diff_drive.html">MotionModelDiffDrive</a></div><div class="ttdoc">Trajectory generation with motion model of differential drive robots.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.h:17</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_html_ab0bbacfda45c549888492ff6b998ffab"><div class="ttname"><a href="class_motion_model_diff_drive.html#ab0bbacfda45c549888492ff6b998ffab">MotionModelDiffDrive::calculate_quadratic_function</a></div><div class="ttdeci">double calculate_quadratic_function(const double, const Eigen::Vector3d &amp;)</div><div class="ttdoc">Calculate ax^2 + bx + c.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.cpp:104</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_html_acc59cfed44ebc303aec321654a30c751"><div class="ttname"><a href="class_motion_model_diff_drive.html#acc59cfed44ebc303aec321654a30c751">MotionModelDiffDrive::response_to_control_inputs</a></div><div class="ttdeci">void response_to_control_inputs(const State &amp;, const double, State &amp;)</div><div class="ttdoc">Limit motion.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.cpp:114</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_1_1_control_params_html"><div class="ttname"><a href="class_motion_model_diff_drive_1_1_control_params.html">MotionModelDiffDrive::ControlParams</a></div><div class="ttdoc">Class containing VelocityParams and AngularVelocityParams.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.h:117</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_html_a9c5284e9c215500a65adc3622349d6b4"><div class="ttname"><a href="class_motion_model_diff_drive.html#a9c5284e9c215500a65adc3622349d6b4">MotionModelDiffDrive::make_velocity_profile</a></div><div class="ttdeci">void make_velocity_profile(const double, const VelocityParams &amp;)</div><div class="ttdoc">Make veloicity profile from given velocity parameter.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.cpp:264</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_1_1_angular_velocity_params_html_adf86344ae0d85f694d668441562a2fe2"><div class="ttname"><a href="class_motion_model_diff_drive_1_1_angular_velocity_params.html#adf86344ae0d85f694d668441562a2fe2">MotionModelDiffDrive::AngularVelocityParams::coefficients</a></div><div class="ttdeci">std::vector&lt; Eigen::Vector4d &gt; coefficients</div><div class="ttdoc">(a, b, c, d) &lt;- ax^3+bx^2+cx+d</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.h:110</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_html_ac79658bdde639a21a5b2c56b6727f540"><div class="ttname"><a href="class_motion_model_diff_drive.html#ac79658bdde639a21a5b2c56b6727f540">MotionModelDiffDrive::calculate_cubic_function</a></div><div class="ttdeci">double calculate_cubic_function(const double, const Eigen::Vector4d &amp;)</div><div class="ttdoc">Calculate ax^3 + bx^2 + cx + d.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.cpp:109</div></div>
<div class="ttc" id="aclass_motion_model_diff_drive_html_aa8b738c94b8a01acc068dd45e79b3cd9"><div class="ttname"><a href="class_motion_model_diff_drive.html#aa8b738c94b8a01acc068dd45e79b3cd9">MotionModelDiffDrive::control_speed</a></div><div class="ttdeci">void control_speed(const State &amp;state, State &amp;_state)</div><div class="ttdoc">Modify speed.</div><div class="ttdef"><b>Definition:</b> motion_model_diff_drive.cpp:141</div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_fd05b9e47017a5cedab53d83dc764deb.html">trajectory_generator</a></li><li class="navelem"><a class="el" href="motion__model__diff__drive_8h.html">motion_model_diff_drive.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
